package my.action.article;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import my.controller.Action;
import my.controller.ActionForward;
import my.db.DAO.ArticleDAO;
import my.db.DTO.ArticleDTO;

public class ArticleDetailIndexAction implements Action{

	@Override
	public ActionForward execute(HttpServletRequest request,HttpServletResponse response) throws Exception {
		ActionForward forward=new ActionForward();
		int id=Integer.parseInt(request.getParameter("articledetailid"));
		ArticleDAO adao=new ArticleDAO();
		ArticleDTO adto=adao.ReadArticle(id);	
		request.setAttribute("articledetail_id", adto);
		forward.setPath("./detail_aticle_index.jsp");
		forward.setRedirect(false);
		return forward;
	
	}

}
